<script lang="ts" setup>
  import zh from 'element-plus/es/locale/lang/zh-cn'
  import en from 'element-plus/es/locale/lang/en'
  const { locale } = useI18n()
  
  import { useOverviewStore } from '~/stores/request'

  const overviewStore = useOverviewStore()

  overviewStore.fetch({
    immediate: true
  })
</script>

<template>
  <el-config-provider :locale="locale === 'zh' ? zh : en">
    <slot></slot>
  </el-config-provider>
</template>